package com.thp.springBootDemo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {
	
	@Autowired
	private Environment environment;   // 这个类是用来读取属性信息的
	
	@RequestMapping("info")
	public String info() {
		return "Hello World !!!  >>>  " + environment.getProperty("url");
	}
	
	@RequestMapping("info2")
	public String info2() {
		return "Hello World22222 !!!  >>>  " + environment.getProperty("url");
	}
	
	
}
